<template>
  <div>
    <!-- 数组语法绑定 class -->
    <span v-bind:class="[activeClass,bgColorClass]">syl</span>
    <!-- 渲染后 <span class="active red-bg">syl</span> -->


  </div>
</template>

<script>
export default {
  name: "render-by-array",
  data(){
    return{
      activeClass: 'active',
      bgColorClass: 'red-bg',
    }
  }
}
</script>

<style scoped>
.active {
  color: pink;
  font-size: 22px;
}
.red-bg {
  background: red;
}
</style>
